package com.jt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//http://localhost:8080/get
@RestController//将类交给spring容器管理
@PropertySource(value = "classpath:/mysql.properties",encoding = "utf-8")
public class JdbcController {
    @Value("${mysql.username}")
    String username;
    @Value("${mysql.password}")
    String password;

    @RequestMapping("get")
    public String get(){
        return username+password;
    }
}
